package controllers

import (
	"blogs/models"
	"blogs/utils"
	beego "github.com/beego/beego/v2/server/web"
)

// Operations about object
type FocusController struct {
	beego.Controller
}

// @Title Get
// @Description 轮播图列表
// @Success 200
// @router / [get]
func (o *FocusController) Get() {
	focus := []models.Focus{}
	utils.DB.Where("id in (?)", []int{1, 2, 3}).Find(&focus)
	o.Data["json"] = focus
	o.ServeJSON()
}
